package com.wu.ssm.tomcat;

import java.io.OutputStream;

/**
 * Created by wzf on 2018/11/11/011.
 */
public class LoginServlet extends MyServlet{
    @Override
    public void doGet(MyRequest request, MyResponse response) {
        this.doPost(request,response);
    }

    @Override
    public void doPost(MyRequest request, MyResponse response)  {
        try {
            OutputStream outputStream = response.outputStream;
            String res = MyResponse.responseHeader+"Hello,welcome to here !";
            outputStream.write(res.getBytes());
            outputStream.flush();
            outputStream.close();
        }catch (Exception ex){
            ex.printStackTrace();
        }

    }
}
